// src/store/reducers/authSaga.reducer.js
const initialValue = {}

export default function (state = initialValue, action) {
    switch (action.type) {
        case 'loginSuccess':
        case 'loadUserSuccess':
            return {
                success: true,
                user: action.payload
            }
        case 'loginFailed':
            return {
                success: false,
                errors: action.payload
            }
        default:
            return state
    }
}